package jsyf.oa.entity.apply;

import com.alibaba.fastjson.JSONObject;

import java.math.BigDecimal;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import jsyf.oa.ientity.BaseEntity;

/**
 * @author: 徐波
 * @creat: 2017/11/30 0030 19:16
 * description:
 */
@Entity
@Table(name = "T_APL_MONEY_MAIN", schema = "oa", catalog = "")
public class MoneyMainEntity extends BaseEntity {

    private String type;
    private String title;
    private String seriesNumber;
    private String orgName;
    private String regionName;
    private String description;
    private String createUserId;
    private String payUserId;
    private String payDate;
    private String remark;
    private String urgentFlag;
    private BigDecimal money;
    private String createUserName;
    private String currentAuditorId;
    private String currentAuditorName;
    private String companyId;
    private String payUserName;
    private String copierReturnReason;
    private String payReturnUserId;
    private String payReturnUserName;
    private String payReturnReasonType;
    private String payReturnReasonDesc;
    private String returnType;//0 终止用款  1其他原因
    /**
     * 审核状态:
     * <p>
     * -1:未提交/草稿<br/>
     * 0: 用款申请已提交/用款申请审核中<br/>
     * 1: 用款申请审核通过/付款申请未提交<br/>
     * 2: 用款申请审核驳回<br/>
     * 3: 付款申请已提交/付款申请审核中<br/>
     * 4: 付款申请审核通过/待付款/未付款<br/>
     * 5: 付款申请审核驳回<br/>
     * 6: 已付款<br/>
     * <p>
     */
    private String auditFlag;
    private String payRemark;
    private Integer haveRefund;//是否有回款 :1是0否
    private String refundFlag;//回款审核流AuditFlag
    private String estimatedReturnDate;//预计回款日期
    private BigDecimal estimatedReturnMoney;//预计回款金额
    private String actualReturnDate;//实际回款日期
    private BigDecimal actualReturnMoney;//实际回款金额
    private String returnPayeeId;//跟踪人ID
    private String returnPayeeName;//跟踪人NAME
    private String returnPayeeRoleName;//跟踪人NAME
    private String haveReturnClear;//是否已结清 :1是0否
    private String returnRemark;//回款备注

    public String getRefundFlag() {
        return refundFlag;
    }

    public void setRefundFlag(String refundFlag) {
        this.refundFlag = refundFlag;
    }

    public String getReturnPayeeRoleName() {
        return returnPayeeRoleName;
    }

    public void setReturnPayeeRoleName(String returnPayeeRoleName) {
        this.returnPayeeRoleName = returnPayeeRoleName;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    @Basic
    @Column(name = "TYPE")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "SERIES_NUMBER")
    public String getSeriesNumber() {
        return seriesNumber;
    }

    public void setSeriesNumber(String seriesNumber) {
        this.seriesNumber = seriesNumber;
    }

    @Basic
    @Column(name = "ORG_NAME")
    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    @Basic
    @Column(name = "REGION_NAME")
    public String getRegionName() {
        return regionName;
    }

    public void setRegionName(String regionName) {
        this.regionName = regionName;
    }

    @Basic
    @Column(name = "DESCRIPTION")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Basic
    @Column(name = "CREATE_USER_ID")
    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }


    @Basic
    @Column(name = "PAY_USER_ID")
    public String getPayUserId() {
        return payUserId;
    }

    public void setPayUserId(String payUserId) {
        this.payUserId = payUserId;
    }

    @Basic
    @Column(name = "PAY_DATE")
    public String getPayDate() {
        return payDate;
    }

    public void setPayDate(String payDate) {
        this.payDate = payDate;
    }

    @Basic
    @Column(name = "REMARK")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "URGENT_FLAG")
    public String getUrgentFlag() {
        return urgentFlag;
    }

    public void setUrgentFlag(String urgentFlag) {
        this.urgentFlag = urgentFlag;
    }

    @Basic
    @Column(name = "AUDIT_FLAG")
    public String getAuditFlag() {
        return auditFlag;
    }

    public void setAuditFlag(String auditFlag) {
        this.auditFlag = auditFlag;
    }

    public String getPayRemark() {
        return payRemark;
    }

    public void setPayRemark(String payRemark) {
        this.payRemark = payRemark;
    }

    public String getCurrentAuditorId() {
        return currentAuditorId;
    }

    public void setCurrentAuditorId(String currentAuditorId) {
        this.currentAuditorId = currentAuditorId;
    }

    public String getCurrentAuditorName() {
        return currentAuditorName;
    }

    public void setCurrentAuditorName(String currentAuditorName) {
        this.currentAuditorName = currentAuditorName;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getPayUserName() {
        return payUserName;
    }

    public void setPayUserName(String payUserName) {
        this.payUserName = payUserName;
    }

    public String getCopierReturnReason() {
        return copierReturnReason;
    }

    public void setCopierReturnReason(String copierReturnReason) {
        this.copierReturnReason = copierReturnReason;
    }

    public String getPayReturnUserId() {
        return payReturnUserId;
    }

    public void setPayReturnUserId(String payReturnUserId) {
        this.payReturnUserId = payReturnUserId;
    }

    public String getPayReturnUserName() {
        return payReturnUserName;
    }

    public void setPayReturnUserName(String payReturnUserName) {
        this.payReturnUserName = payReturnUserName;
    }

    public String getPayReturnReasonType() {
        return payReturnReasonType;
    }

    public void setPayReturnReasonType(String payReturnReasonType) {
        this.payReturnReasonType = payReturnReasonType;
    }

    public String getPayReturnReasonDesc() {
        return payReturnReasonDesc;
    }

    public void setPayReturnReasonDesc(String payReturnReasonDesc) {
        this.payReturnReasonDesc = payReturnReasonDesc;
    }

    public String getReturnType() {
        return returnType;
    }

    public void setReturnType(String returnType) {
        this.returnType = returnType;
    }

    public Integer getHaveRefund() {
        return haveRefund;
    }

    public void setHaveRefund(Integer haveRefund) {
        this.haveRefund = haveRefund;
    }

    public String getEstimatedReturnDate() {
        return estimatedReturnDate;
    }

    public void setEstimatedReturnDate(String estimatedReturnDate) {
        this.estimatedReturnDate = estimatedReturnDate;
    }

    public String getActualReturnDate() {
        return actualReturnDate;
    }

    public void setActualReturnDate(String actualReturnDate) {
        this.actualReturnDate = actualReturnDate;
    }

    public BigDecimal getEstimatedReturnMoney() {
        return estimatedReturnMoney;
    }

    public void setEstimatedReturnMoney(BigDecimal estimatedReturnMoney) {
        this.estimatedReturnMoney = estimatedReturnMoney;
    }

    public BigDecimal getActualReturnMoney() {
        return actualReturnMoney;
    }

    public void setActualReturnMoney(BigDecimal actualReturnMoney) {
        this.actualReturnMoney = actualReturnMoney;
    }

    public String getReturnPayeeId() {
        return returnPayeeId;
    }

    public void setReturnPayeeId(String returnPayeeId) {
        this.returnPayeeId = returnPayeeId;
    }

    public String getReturnPayeeName() {
        return returnPayeeName;
    }

    public void setReturnPayeeName(String returnPayeeName) {
        this.returnPayeeName = returnPayeeName;
    }

    public String getHaveReturnClear() {
        return haveReturnClear;
    }

    public void setHaveReturnClear(String haveReturnClear) {
        this.haveReturnClear = haveReturnClear;
    }

    public String getReturnRemark() {
        return returnRemark;
    }

    public void setReturnRemark(String returnRemark) {
        this.returnRemark = returnRemark;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", id);
        obj.put("TYPE", type);
        obj.put("TITLE", title);
        obj.put("SERIES_NUMBER", seriesNumber);
        obj.put("ORG_NAME", orgName);
        obj.put("REGION_NAME", regionName);
        obj.put("DESCRIPTION", description);
        obj.put("CREATE_USER_ID", createUserId);
        obj.put("CREATE_TIME", createTime);
        obj.put("PAY_USER_ID", payUserId);
        obj.put("PAY_DATE", payDate);
        obj.put("REMARK", remark);
        obj.put("URGENT_FLAG", urgentFlag);
        obj.put("AUDIT_FLAG", auditFlag);
        obj.put("PAY_REMARK", payRemark);
        obj.put("MONEY", money);
        obj.put("RETURN_TYPE", returnType);
        obj.put("CREATE_USER_NAME", createUserName);
        obj.put("CURRENT_AUDITOR_ID", this.getCurrentAuditorId());
        obj.put("CURRENT_AUDITOR_NAME", this.getCurrentAuditorName());
        obj.put("COMPANY_ID", this.getCompanyId());
        obj.put("PAY_USER_NAME", this.getPayUserName());
        obj.put("COPIER_RETURN_REASON", this.getCopierReturnReason());
        obj.put("PAY_RETURN_USER_ID", this.getPayReturnUserId());
        obj.put("PAY_RETURN_USER_NAME", this.getPayReturnUserName());
        obj.put("PAY_RETURN_REASON_TYPE", this.getPayReturnReasonType());
        obj.put("PAY_RETURN_REASON_DESC", this.getPayReturnReasonDesc());
        obj.put("HAVE_REFUND", this.getHaveRefund());
        obj.put("ESTIMATED_RETURN_DATE", this.getEstimatedReturnDate());
        obj.put("ESTIMATED_RETURN_MONEY", this.getEstimatedReturnMoney());
        obj.put("ACTUAL_RETURN_DATE", this.getActualReturnDate());
        obj.put("ACTUAL_RETURN_MONEY", this.getActualReturnMoney());
        obj.put("RETURN_PAYEE_ID", this.getReturnPayeeId());
        obj.put("RETURN_PAYEE_NAME", this.getReturnPayeeName());
        obj.put("RETURN_PAYEE_ROLE_NAME", this.getReturnPayeeRoleName());
        obj.put("HAVE_RETURN_CLEAR", this.getHaveReturnClear());
        obj.put("RETURN_REMARK", this.getReturnRemark());
        obj.put("REFUND_FLAG", this.getRefundFlag());
        obj.put("UPDATE_USER_ID", getUpdateUserId());
        obj.put("UPDATE_TIME", getUpdateTime());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_APL_MONEY_MAIN";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("TYPE", "type");
        obj.put("TITLE", "title");
        obj.put("SERIES_NUMBER", "seriesNumber");
        obj.put("ORG_NAME", "orgName");
        obj.put("REGION_NAME", "regionName");
        obj.put("DESCRIPTION", "description");
        obj.put("CREATE_USER_ID", "createUserId");
        obj.put("CREATE_TIME", "createTime");
        obj.put("PAY_USER_ID", "payUserId");
        obj.put("PAY_DATE", "payDate");
        obj.put("REMARK", "remark");
        obj.put("URGENT_FLAG", "urgentFlag");
        obj.put("AUDIT_FLAG", "auditFlag");
        obj.put("PAY_REMARK", "payRemark");
        obj.put("MONEY", "money");
        obj.put("RETURN_TYPE", "returnType");
        obj.put("CREATE_USER_NAME", "createUserName");
        obj.put("CURRENT_AUDITOR_ID", "currentAuditorId");
        obj.put("CURRENT_AUDITOR_NAME", "currentAuditorName");
        obj.put("COMPANY_ID", "companyId");
        obj.put("PAY_USER_NAME", "payUserName");
        obj.put("COPIER_RETURN_REASON", "copierReturnReason");
        obj.put("PAY_RETURN_USER_ID", "payReturnUserId");
        obj.put("PAY_RETURN_USER_NAME", "payReturnUserName");
        obj.put("PAY_RETURN_REASON_TYPE", "payReturnReasonType");
        obj.put("PAY_RETURN_REASON_DESC", "payReturnReasonDesc");
        obj.put("HAVE_REFUND", "haveRefund");
        obj.put("ESTIMATED_RETURN_DATE", "estimatedReturnDate");
        obj.put("ESTIMATED_RETURN_MONEY", "estimatedReturnMoney");
        obj.put("ACTUAL_RETURN_DATE", "actualReturnDate");
        obj.put("ACTUAL_RETURN_MONEY", "actualReturnMoney");
        obj.put("RETURN_PAYEE_ID", "returnPayeeId");
        obj.put("RETURN_PAYEE_NAME", "returnPayeeName");
        obj.put("RETURN_PAYEE_ROLE_NAME", "returnPayeeRoleName");
        obj.put("HAVE_RETURN_CLEAR", "haveReturnClear");
        obj.put("RETURN_REMARK", "returnRemark");
        obj.put("REFUND_FLAG", "refundFlag");
        obj.put("UPDATE_USER_ID", "updateUserId");
        obj.put("UPDATE_TIME", "updateTime");
        return obj;
    }

}
